package com.goods.controller.business;


import com.goods.business.service.ProductService;
import com.goods.common.model.business.Product;
import com.goods.common.response.ResponseBean;
import com.goods.common.vo.business.ProductVO;
import com.goods.common.vo.system.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api(tags = "业务模块-物资资料相关接口")
@RestController
@RequestMapping("/business/product")
public class ProductController {
    @Autowired
    private ProductService productService;



// /findProductList?pageNum=1&pageSize=6&name=&categoryId=&supplier=&status=0  3.1、物资资料分页列表展示
    @ApiOperation(value = "物资资料分页列表展示")
    @GetMapping("findProductList")
    public ResponseBean<PageVO<Product>> findProductList(@RequestParam Map<String,String> paramMap) {
        PageVO<Product> pageVO = productService.findProductList(paramMap);
        return ResponseBean.success(pageVO);
    }
}
